import type { RouteRecordRaw } from "vue-router";

const routes: RouteRecordRaw[] = [
  /* ========================= 重定向入口 ========================= */
  {
    path: "/",
    redirect: "/sourceData",
  },

  /* ========================= 列表页 ========================= */
  {
    path: "/sourceData",
    name: "sourceDataIndex",
    component: () => import("./views/sourceData/index.vue"),
  },

  /* ========================= 新增/编辑页 ========================= */
  {
    path: "/sourceData/edit/:id?",
    name: "sourceDataEdit",
    component: () => import("./views/sourceData/sourceDataPage.vue"),
    props: true,
  },
];

export default routes;
